#ifndef PROTOCOL_H
#define PROTOCOL_H

#include <qglobal.h>//基本数据类型

#include <QDebug>
#include <QMessageBox>
#include <QString>
#include "comfunc.h"
#include "mainwindow.h"

#define uint8 quint8

#define ID_LEN          0x04


extern uint8 frame_buffer[];


struct SHS_frame
{
    uint8 stc;
    uint8 said[ID_LEN];
    uint8 taid[ID_LEN];
    uint8 seq;
    uint8 length;
    uint8 infor[1];
};
struct FBD_Frame
{
    uint8 cmd;
    uint8 did[2];
    uint8 ctrl;
    uint8 data[1];
};
#define SHS_FRAME_HEAD 11
#define STC 0X7E



struct SHS_frame *get_smart_frame(uint8 rxframe_raw[],uint8 rxlen);


#endif // PROTOCOL_H
